#region License Revision: 0 Last Revised: 6/18/2008 11:00 AM
/******************************************************************************
Copyright (c) Microsoft Corporation.  All rights reserved.


This file is licensed under the Microsoft Public License (Ms-PL). A copy of the Ms-PL should accompany this file. 
If it does not, you can obtain a copy from: 

http://www.microsoft.com/resources/sharedsource/licensingbasics/publiclicense.mspx
******************************************************************************/
#endregion // License
using System;
using System.Windows.Browser;
using System.Diagnostics;
using ScriptInterop;

namespace VIEWS // Virtual Earth Wrapper
{

/// <summary>Specifies a step in the step-by-step directions of a route.</summary>
public class VERouteItineraryItem : JSObject
{
	/// <summary>String holding JavaScript class name</summary>
	private static string thisClass = "VERouteItineraryItem";
	
	/// <summary>Get the JavaScript class name</summary>
	/// <returns type="String">The class name used in JavaScript </returns>		
	public override string ClassName
	{
		get { return thisClass; }
	}

	/// <summary>Construct a C# wrapper from a ScriptObject</summary>
	/// <param name="so">A ScriptObjet from JScript.</param>
	public VERouteItineraryItem(ScriptObject so) : base(so) { }

	/// <summary>Construct a C# wrapper from a ScriptObject</summary>
	public VERouteItineraryItem() { }

	/// <summary name="Distance">A floating-point number specifying the distance of the step</summary>		
	public double Distance
	{
		get { return GetProperty<double>("Distance"); }
	}
	/// <summary name="LatLong">A VELatLong Class object specifying the position of the step</summary>  
	public VELatLong LatLong
	{
		get { var so = GetProperty<ScriptObject>("LatLong"); return new VELatLong(so); }
	}
	/// <summary name="Shape">A VEShape Class object specifying the shape of the step</summary>
	public VEShape Shape
	{
		get 
		{ 
			var so = GetProperty<ScriptObject>("Shape"); 
			if (so == null) 
				return null; 
			VEShape shape = VEShape.GetShapeObject(so);
			return shape;
		}
	}
	/// <summary name="Text">A String specifying the description of the step</summary>
	public string Text
	{
		get { return GetProperty<string>("Text"); }
	}
	/// <summary name="Time">The total elapsed time, in seconds, to traverse the route itinerary step.</summary>  
	public int Time
	{
		get { return GetProperty<int>("Time"); }
	}
} 

}
